﻿@mixin center($horizontal: false, $vertical: false, $absolute: false, $important: false)
   $importantMark: if($important, !important, null)
   position: if($absolute, absolute, relative) $importantMark
   $indent: 50% $importantMark
   $transform: null
   @if $horizontal
     left: $indent
     $transform: translateX(-50%)
   @if $vertical
     top: $indent
     $transform: $transform translateY(-50%)
   transform: $transform $importantMark

@mixin column($selector, $count, $indexed: false, $multipleOnly: false)
  $start: if($indexed, 1, 2)
  @if (not $indexed and not $multipleOnly)
    #{$selector}
      @content
      width: 100%
  @for $x from $start through $count
    $currentCount: $x
    @if $indexed
      $currentCount: $x + 1;
      #{$selector}:nth-last-child(#{$currentCount}) ~ #{$selector}
        @content
        width: (100% / $x)
    @else
      #{$selector}:nth-last-child(#{$currentCount}),
      #{$selector}:nth-last-child(#{$currentCount}) ~ #{$selector}
        @content
        width: (100% / $x)

@mixin blaseSizes()
  $bladeSizeName: nth($bladeSizes, 1) !global
  &.__#{to-lower-case($bladeSizeName)}-narrow
    @content  
  $bladeSizeName: nth($bladeSizes, 2) !global
  @content
  @for $bladeSizeIndex from 3 through length($bladeSizes)
    $bladeSizeName: nth($bladeSizes, $bladeSizeIndex) !global
    &.__#{to-lower-case($bladeSizeName)}-wide
      @content